;#############################
;命令：
;nasm -f elf64 day0_1print_2macro.asm -o main.o && ld main.o -o main && ./main
;输出：
;Hello, World! This is YuXiaoyang! Ye! macro
;#############################

;#############################
;先定义后调用
;因而定义写在上面

;两个传入参数
%macro print 2
	mov rax, 1
	mov rdi, 1
	mov rsi, %1
	mov rdx, %2
	syscall
%endmacro

;无传入参数
%macro exit 0
	mov rax, 60
	mov rdi, 0
	syscall
%endmacro
;#############################
section .data
	msg: db "Hello, World! This is YuXiaoyang! Ye! macro", 10, 0
	length: equ $ - msg

section .text
	global _start

_start:
	print msg, length
	exit
